package xio.ccf_201512;

import java.util.*;

/**
 * ccf 201512-4 送货 70分
 * Created by Xio on 2017/10/16 0016.
 */
public class Delivery {

    static Graph g;
    static boolean[] vis;
    static boolean[] vis2;
    static Stack<Integer> stack;

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(); //节点数
        int m = sc.nextInt(); //街道数

        g = new Graph(n + 1);

        stack = new Stack<>(); //记录路径
        vis = new boolean[n + 1];
        vis2 = new boolean[2 * m + 2];

        Edge[] edges = new Edge[2 * (m + 1)];

        for (int i = 1; i <= 2 * m; i += 2) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            edges[i] = new Edge(a, i);
            edges[i - 1] = new Edge(b, i - 1);
            g.addEdge(a, edges[i - 1]);
            g.addEdge(b, edges[i]);
        }

        vis[1] = true;
        dfs(1);
        for (int i = 1; i < vis.length; i++) {
            if (!vis[i]) {
                System.out.printf("-1");
                return;
            }
        }

        int sum = 0;
        int start = -1;
        for (int i = 1; i <= n; i++) {
            if ((g.adj(i).size()&1) != 0) {
                if(start == -1) {
                    start = i;
                }
                sum++;
            }
        }

        if (sum != 0 && sum != 2) {
            System.out.printf("-1");
            return;
        }
        if(start == -1) {
            start = 1;
        }
        dfs2(start);
        while (!stack.isEmpty()) {
            System.out.print(stack.pop() + " ");
        }
    }

    static void dfs(int v) {
        for (Edge e : g.adj(v)) {
            if (vis[e.v]) continue;
            vis[e.v] = true;
            dfs(e.v);
        }
    }

    static void dfs2(int v) {
        PriorityQueue<Edge> pq = new PriorityQueue<>();
//        for (Edge e : g.adj(v)) {
            pq.addAll(g.adj(v));
            while (!pq.isEmpty()){
                Edge e = pq.poll();
                if (vis2[e.id]) continue;
                vis2[e.id] = true;
                vis2[e.id ^ 1] = true;
                dfs2(e.v);
            }

//        }
        stack.push(v);
    }


    static class Graph {

        List<LinkedHashSet<Edge>> adj;

        public Graph(int N) {
            adj = new ArrayList<>();
            for (int i = 1; i <= N; i++) {
                adj.add(new LinkedHashSet<Edge>());
            }
        }

        public void addEdge(int a, Edge e) {
            adj.get(a).add(e);
        }

        public LinkedHashSet<Edge> adj(int i) {
            return adj.get(i);
        }
    }

    static class Edge implements Comparable<Edge> {
        int v, id;

        public Edge(int v, int id) {
            this.v = v;
            this.id = id;
        }


        @Override
        public int compareTo(Edge o) {
            if (this.v > o.v) {
                return 1;
            } else if (this.v < o.v) {
                return -1;
            }
            return 0;
        }
    }
}
